package com.txzt.gaea.common.base.service;

import org.beetl.sql.core.engine.PageQuery;

import java.util.List;

/**
 * Created by Leo on 18/6/6.
 */
public interface BaseService<T> {
    T selectById(Integer id);
    T selectById(Long id);
    T selectOne(T t);

    List<T> query();
    int save(T t);

    PageQuery<T> pageQuery(PageQuery<T> pageQuery);
    PageQuery<T> pageQuery(String sqlId, PageQuery<T> pageQuery);
    int delete(T t);
    int deleteById(Integer id);
    int deleteById(Long id);
    int updateById(T t);
    int insertTemplate(T t);
    int[] insertBatch(Class<T> t, List<T> list);
}
